package org.lmind.example.uc.webapp.action;

import javax.annotation.Resource;
import javax.ejb.TransactionAttribute;

import org.lmind.example.uc.api.UserCenter;
import org.lmind.example.uc.webapp.view.PageView;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

@Controller
@RequestMapping(value = "user")
public class LoginPage extends AbstractController {
	
	@Resource
	private UserCenter userCenter;

	@RequestMapping(value = "login", method = RequestMethod.GET)
	public Object page() {
		TransactionAttribute.class.getName();
		userCenter.login("11", "22");
		return new PageView("index", "hello world");
	}
}
